package pri.damai.xiaowu.gateway.enums;

import pri.damai.xiaowu.common.core.enums.base.StringEnumerator;

import java.io.Serializable;

/**
 * 错误值枚举
 * @Desc
 * @Author DaMai
 * @Date 2021/3/23 15:26
 * 但行好事，莫问前程。
 */
public enum GatewayResultEnum implements StringEnumerator, Serializable {
    /**  */
    GATEWAY_SYS_ERROR("100000", "网关系统错误异常。"),
    PERMISSION_DENIED("100005", "未授权，请联系管理员授权。"),
    UNAUTHORIZED("100006", "未认证，请登录后操作。"),
    INVALID_TOKEN("100008", "无效的TOKEN。");

    private final String code;
    private final String msg;

    GatewayResultEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public String desc() {
        return this.msg;
    }
}
